package top.wardyan.wbaseswt.conf;

import java.io.File;

import top.wardyan.base.db.BaseSQLiteDatasource;

public class Test extends BaseSQLiteDatasource{

	protected Test(String url, String user, String password, String arpName) throws RuntimeException {
		super(url, user, password, arpName);
	}

	public static void main(String[] args) {
		File file = new File("conf/config.db");
		new Test("jdbc:sqlite://" + file.getAbsolutePath(), "", "", "test");
		
	}
	/**
		File file = new File("conf/config.db");
		
		DruidPlugin dp = new DruidPlugin("jdbc:sqlite://" + file.getAbsolutePath(),
					"",
					"",
					"org.sqlite.JDBC");
					
		ActiveRecordPlugin arp = new ActiveRecordPlugin("test", dp);
		arp.setDialect(new Sqlite3Dialect());	// 方言
		//if(this.setOrderColumn())
		//arp.setContainerFactory(new OrderedFieldContainerFactory());	// 设置使列顺序是否按照数据库定义的一样
		//this.mapping();	// 映射
		dp.start();		// 打开
		arp.start();	// 打开
		System.out.println(Db.use("test").query("select * from dbassist").size());;
		arp.stop();
		dp.stop();
		System.out.println("mmm");
	 */

	@Override
	protected void mapping() {
	}

	@Override
	protected String getPublicKey() {
		return "";
	}
}
